///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 27 2009)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "GLCanvasPane.h"

#include "AdamsAleAppGui.h"

///////////////////////////////////////////////////////////////////////////

MyFrame1::MyFrame1( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	m_menubar1 = new wxMenuBar( 0 );
	m_menu1 = new wxMenu();
	wxMenuItem* m_menuItem1;
	m_menuItem1 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("New") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu1->Append( m_menuItem1 );
	
	wxMenuItem* m_menuItem2;
	m_menuItem2 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("Open...") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu1->Append( m_menuItem2 );
	
	wxMenuItem* m_menuItem3;
	m_menuItem3 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("Save") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu1->Append( m_menuItem3 );
	
	wxMenuItem* m_menuItem4;
	m_menuItem4 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("Save As...") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu1->Append( m_menuItem4 );
	
	wxMenuItem* m_separator1;
	m_separator1 = m_menu1->AppendSeparator();
	
	wxMenuItem* m_menuItem15;
	m_menuItem15 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("Import Borehole...") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu1->Append( m_menuItem15 );
	
	wxMenuItem* m_menuItem16;
	m_menuItem16 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("Export as CSV") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu1->Append( m_menuItem16 );
	
	wxMenuItem* m_separator2;
	m_separator2 = m_menu1->AppendSeparator();
	
	wxMenuItem* m_menuItem5;
	m_menuItem5 = new wxMenuItem( m_menu1, wxID_ANY, wxString( wxT("Exit") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu1->Append( m_menuItem5 );
	
	m_menubar1->Append( m_menu1, wxT("File") );
	
	m_menu2 = new wxMenu();
	wxMenuItem* m_menuItem8;
	m_menuItem8 = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("Semivariogram") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu2->Append( m_menuItem8 );
	
	wxMenuItem* m_menuItem121;
	m_menuItem121 = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("Resize") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu2->Append( m_menuItem121 );
	
	wxMenuItem* m_menuItem81;
	m_menuItem81 = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("Clear") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu2->Append( m_menuItem81 );
	
	m_menubar1->Append( m_menu2, wxT("Plot") );
	
	m_menu3 = new wxMenu();
	wxMenuItem* m_menuItem13;
	m_menuItem13 = new wxMenuItem( m_menu3, wxID_ANY, wxString( wxT("Interpolate") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu3->Append( m_menuItem13 );
	
	m_menubar1->Append( m_menu3, wxT("Model") );
	
	m_menu4 = new wxMenu();
	wxMenuItem* m_menuItem14;
	m_menuItem14 = new wxMenuItem( m_menu4, wxID_ANY, wxString( wxT("About") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu4->Append( m_menuItem14 );
	
	m_menubar1->Append( m_menu4, wxT("Help") );
	
	m_menu5 = new wxMenu();
	wxMenuItem* m_menuItem131;
	m_menuItem131 = new wxMenuItem( m_menu5, wxID_ANY, wxString( wxT("Height Map") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu5->Append( m_menuItem131 );
	
	wxMenuItem* m_menuItem151;
	m_menuItem151 = new wxMenuItem( m_menu5, wxID_ANY, wxString( wxT("Terrain") ) , wxEmptyString, wxITEM_NORMAL );
	m_menu5->Append( m_menuItem151 );
	
	m_menubar1->Append( m_menu5, wxT("Visual") );
	
	this->SetMenuBar( m_menubar1 );
	
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
	
	m_splitter1 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
	m_splitter1->SetSashGravity( 1 );
	m_splitter1->Connect( wxEVT_IDLE, wxIdleEventHandler( MyFrame1::m_splitter1OnIdle ), NULL, this );
	
	m_panel51 = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxVERTICAL );
	
	m_splitter2 = new wxSplitterWindow( m_panel51, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
	m_splitter2->Connect( wxEVT_IDLE, wxIdleEventHandler( MyFrame1::m_splitter2OnIdle ), NULL, this );
	
	m_panel9 = new wxPanel( m_splitter2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxVERTICAL );
	
	m_notebook1 = new wxNotebook( m_panel9, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_panel2 = new GLCanvasPane( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_notebook1->AddPage( m_panel2, wxT("Visual"), false );
	m_scrolledWindow1 = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
	m_scrolledWindow1->SetScrollRate( 5, 5 );
	wxBoxSizer* bSizer8;
	bSizer8 = new wxBoxSizer( wxVERTICAL );
	
	m_grid1 = new wxGrid( m_scrolledWindow1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	
	// Grid
	m_grid1->CreateGrid( 5, 5 );
	m_grid1->EnableEditing( false );
	m_grid1->EnableGridLines( true );
	m_grid1->EnableDragGridSize( false );
	m_grid1->SetMargins( 0, 0 );
	
	// Columns
	m_grid1->EnableDragColMove( false );
	m_grid1->EnableDragColSize( true );
	m_grid1->SetColLabelSize( 20 );
	m_grid1->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
	
	// Rows
	m_grid1->EnableDragRowSize( true );
	m_grid1->SetRowLabelSize( 60 );
	m_grid1->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
	
	// Label Appearance
	
	// Cell Defaults
	m_grid1->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
	bSizer8->Add( m_grid1, 1, wxALL|wxEXPAND, 5 );
	
	m_scrolledWindow1->SetSizer( bSizer8 );
	m_scrolledWindow1->Layout();
	bSizer8->Fit( m_scrolledWindow1 );
	m_notebook1->AddPage( m_scrolledWindow1, wxT("Raw Data"), true );
	
	bSizer7->Add( m_notebook1, 1, wxEXPAND | wxALL, 5 );
	
	m_panel9->SetSizer( bSizer7 );
	m_panel9->Layout();
	bSizer7->Fit( m_panel9 );
	m_panel8 = new wxPanel( m_splitter2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxVERTICAL );
	
	m_plotCtrl1 = new PlotCtrlPane(m_panel8, wxID_ANY, wxDefaultPosition, wxDefaultSize );
	m_plotCtrl1->SetScrollOnThumbRelease( false );
	m_plotCtrl1->SetDrawSymbols( true );
	m_plotCtrl1->SetDrawLines( true );
	m_plotCtrl1->SetDrawSpline( false );
	m_plotCtrl1->SetDrawGrid( true );
	m_plotCtrl1->SetAreaMouseFunction( wxPLOTCTRL_MOUSE_ZOOM );
	m_plotCtrl1->SetAreaMouseMarker( wxPLOTCTRL_MARKER_RECT );
	m_plotCtrl1->SetCrossHairCursor( false );
	m_plotCtrl1->SetShowXAxis( true );
	m_plotCtrl1->SetShowXAxisLabel( true );
	m_plotCtrl1->SetXAxisLabel( wxT("distance") );
	m_plotCtrl1->SetShowYAxis( true );
	m_plotCtrl1->SetShowYAxisLabel( true );
	m_plotCtrl1->SetYAxisLabel( wxT("Semivariance") );
	m_plotCtrl1->SetShowPlotTitle( true );
	m_plotCtrl1->SetPlotTitle( wxT("Semivariogram") );
	m_plotCtrl1->SetPlotTitleFont( wxFont( 14, 70, 90, 92, false, wxEmptyString ) );
	m_plotCtrl1->SetShowKey( true );
	m_plotCtrl1->SetKeyPosition( wxPoint( 70,0 ) );
	
	bSizer5->Add( m_plotCtrl1, 1, wxALL|wxEXPAND, 5 );
	
	m_panel8->SetSizer( bSizer5 );
	m_panel8->Layout();
	bSizer5->Fit( m_panel8 );
	m_splitter2->SplitHorizontally( m_panel9, m_panel8, 257 );
	bSizer4->Add( m_splitter2, 1, wxEXPAND, 5 );
	
	m_panel51->SetSizer( bSizer4 );
	m_panel51->Layout();
	bSizer4->Fit( m_panel51 );
	m_panel5 = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer81;
	bSizer81 = new wxBoxSizer( wxVERTICAL );
	
	wxFlexGridSizer* fgSizer3;
	fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer3->SetFlexibleDirection( wxBOTH );
	fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText17 = new wxStaticText( m_panel5, wxID_ANY, wxT("Semivariogram"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText17->Wrap( -1 );
	m_staticText17->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	fgSizer3->Add( m_staticText17, 0, wxALL, 5 );
	
	m_staticline3 = new wxStaticLine( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	fgSizer3->Add( m_staticline3, 1, wxEXPAND|wxALL, 5 );
	
	m_staticText8 = new wxStaticText( m_panel5, wxID_ANY, wxT("Range (distance):"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText8->Wrap( -1 );
	fgSizer3->Add( m_staticText8, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	textCtrlRange = new wxTextCtrl( m_panel5, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
	fgSizer3->Add( textCtrlRange, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText9 = new wxStaticText( m_panel5, wxID_ANY, wxT("Sill (variance):"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText9->Wrap( -1 );
	fgSizer3->Add( m_staticText9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	textCtrlSill = new wxTextCtrl( m_panel5, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
	fgSizer3->Add( textCtrlSill, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText18 = new wxStaticText( m_panel5, wxID_ANY, wxT("Model Type:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText18->Wrap( -1 );
	fgSizer3->Add( m_staticText18, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_listBox1 = new wxListBox( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE );
	m_listBox1->Append( wxT("Spherical") );
	m_listBox1->Append( wxT("Exponential") );
	m_listBox1->Append( wxT("Gaussian") );
	fgSizer3->Add( m_listBox1, 0, wxALL, 5 );
	
	m_staticText21 = new wxStaticText( m_panel5, wxID_ANY, wxT("Scale X Direction:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText21->Wrap( -1 );
	fgSizer3->Add( m_staticText21, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textCtrl5 = new wxTextCtrl( m_panel5, wxID_ANY, wxT("100%"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
	fgSizer3->Add( m_textCtrl5, 0, wxALL, 5 );
	
	m_staticText22 = new wxStaticText( m_panel5, wxID_ANY, wxT("Scale Y Direction:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText22->Wrap( -1 );
	fgSizer3->Add( m_staticText22, 0, wxALL, 5 );
	
	m_textCtrl6 = new wxTextCtrl( m_panel5, wxID_ANY, wxT("100%"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
	fgSizer3->Add( m_textCtrl6, 0, wxALL, 5 );
	
	bSizer81->Add( fgSizer3, 0, wxALL, 5 );
	
	wxFlexGridSizer* fgSizer31;
	fgSizer31 = new wxFlexGridSizer( 1, 1, 0, 0 );
	fgSizer31->SetFlexibleDirection( wxBOTH );
	fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText171 = new wxStaticText( m_panel5, wxID_ANY, wxT("Interpolation"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText171->Wrap( -1 );
	m_staticText171->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer10->Add( m_staticText171, 0, wxALL, 5 );
	
	m_staticline4 = new wxStaticLine( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer10->Add( m_staticline4, 1, wxEXPAND | wxALL, 5 );
	
	fgSizer31->Add( bSizer10, 1, wxEXPAND, 5 );
	
	m_listBox11 = new wxListBox( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE );
	m_listBox11->Append( wxT("Inverse Distance Weight") );
	m_listBox11->Append( wxT("Ordinary Kriging") );
	fgSizer31->Add( m_listBox11, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_checkBox1 = new wxCheckBox( m_panel5, wxID_ANY, wxT("Adjust for Sparse Data"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer31->Add( m_checkBox1, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer9;
	bSizer9 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText20 = new wxStaticText( m_panel5, wxID_ANY, wxT("Number of Runs:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText20->Wrap( -1 );
	bSizer9->Add( m_staticText20, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	textCtrlRuns = new wxTextCtrl( m_panel5, wxID_ANY, wxT("10"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer9->Add( textCtrlRuns, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
	
	fgSizer31->Add( bSizer9, 1, wxEXPAND, 5 );
	
	bSizer81->Add( fgSizer31, 0, 0, 5 );
	
	wxFlexGridSizer* fgSizer32;
	fgSizer32 = new wxFlexGridSizer( 1, 2, 0, 0 );
	fgSizer32->SetFlexibleDirection( wxBOTH );
	fgSizer32->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_button4 = new wxButton( m_panel5, wxID_ANY, wxT("Go!"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer32->Add( m_button4, 0, wxALL|wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	bSizer81->Add( fgSizer32, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_panel5->SetSizer( bSizer81 );
	m_panel5->Layout();
	bSizer81->Fit( m_panel5 );
	m_splitter1->SplitVertically( m_panel51, m_panel5, 550 );
	bSizer1->Add( m_splitter1, 1, wxEXPAND, 5 );
	
	this->SetSizer( bSizer1 );
	this->Layout();
	m_statusBar1 = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
	m_toolBar1 = this->CreateToolBar( wxTB_HORIZONTAL, wxID_ANY ); 
	m_toolBar1->AddTool( ID_FILENEW, wxT("New"), wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/new.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("New Project"), wxT("Create a New Model") );
	m_toolBar1->AddTool( ID_OPEN, wxT("Open"), wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/open.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("Open"), wxT("Open an existing Model") );
	m_toolBar1->AddTool( ID_SAVE, wxT("Save"), wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/save.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("Save a Project"), wxT("Save the Current Model") );
	m_toolBar1->AddSeparator();
	m_toolBar1->AddTool( wxID_ANY, wxT("Undo"), wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/undo.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("undo"), wxT("undo any unwanted work") );
	m_toolBar1->AddTool( wxID_ANY, wxT("Redo"), wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/redo.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("redo any deleted work"), wxT("redo any unwanted to be deleted that was deleted work") );
	m_toolBar1->AddSeparator();
	m_toolBar1->AddTool( wxID_ANY, wxT("Cut"), wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/cut.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("cut an item"), wxT("cut an item to paste it into another seperate document") );
	m_toolBar1->AddTool( wxID_ANY, wxT("copy"), wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/copy.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("copy"), wxT("copy an item to move it into another document") );
	m_toolBar1->AddTool( wxID_ANY, wxT("paste"), wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/paste.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("paste "), wxT("paste an item into a document that you had previously cut") );
	m_toolBar1->AddTool( wxID_ANY, wxT("Delete"), wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/delete.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("delete"), wxT("delete an unwanted item") );
	m_toolBar1->AddSeparator();
	m_toolBar1->Realize();
	
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_IDLE, wxIdleEventHandler( MyFrame1::OnDClick ) );
	this->Connect( m_menuItem1->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnNew ) );
	this->Connect( m_menuItem2->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnOpenFile ) );
	this->Connect( m_menuItem3->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnSave ) );
	this->Connect( m_menuItem4->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnSaveAs ) );
	this->Connect( m_menuItem15->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnImport ) );
	this->Connect( m_menuItem5->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnQuit ) );
	this->Connect( m_menuItem8->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnSemivariogram ) );
	this->Connect( m_menuItem121->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnResizePlot ) );
	this->Connect( m_menuItem81->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnClearPlot ) );
	this->Connect( m_menuItem13->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnKrigePoints ) );
	this->Connect( m_menuItem14->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnAbout ) );
	this->Connect( m_menuItem131->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnHeightMap ) );
	this->Connect( m_menuItem151->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnTerrain ) );
	m_grid1->Connect( wxEVT_GRID_CELL_CHANGE, wxGridEventHandler( MyFrame1::OnDataInput ), NULL, this );
	textCtrlRange->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyFrame1::OnRange ), NULL, this );
	textCtrlSill->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyFrame1::OnSill ), NULL, this );
	m_listBox1->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MyFrame1::OnPlot ), NULL, this );
	m_textCtrl5->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyFrame1::OnScaleX ), NULL, this );
	m_textCtrl6->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyFrame1::OnScaleY ), NULL, this );
	m_listBox11->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MyFrame1::OnPlot ), NULL, this );
	m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyFrame1::OnKrigePoints ), NULL, this );
	this->Connect( ID_FILENEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MyFrame1::OnToolClicked ) );
	this->Connect( ID_OPEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MyFrame1::OnToolClicked ) );
	this->Connect( ID_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MyFrame1::OnToolClicked ) );
}

MyFrame1::~MyFrame1()
{
	// Disconnect Events
	this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( MyFrame1::OnDClick ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnNew ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnOpenFile ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnSave ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnSaveAs ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnImport ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnQuit ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnSemivariogram ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnResizePlot ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnClearPlot ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnKrigePoints ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnAbout ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnHeightMap ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MyFrame1::OnTerrain ) );
	m_grid1->Disconnect( wxEVT_GRID_CELL_CHANGE, wxGridEventHandler( MyFrame1::OnDataInput ), NULL, this );
	textCtrlRange->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyFrame1::OnRange ), NULL, this );
	textCtrlSill->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyFrame1::OnSill ), NULL, this );
	m_listBox1->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MyFrame1::OnPlot ), NULL, this );
	m_textCtrl5->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyFrame1::OnScaleX ), NULL, this );
	m_textCtrl6->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyFrame1::OnScaleY ), NULL, this );
	m_listBox11->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MyFrame1::OnPlot ), NULL, this );
	m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyFrame1::OnKrigePoints ), NULL, this );
	this->Disconnect( ID_FILENEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MyFrame1::OnToolClicked ) );
	this->Disconnect( ID_OPEN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MyFrame1::OnToolClicked ) );
	this->Disconnect( ID_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( MyFrame1::OnToolClicked ) );
}

Dialog1::Dialog1( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxGridSizer* gSizer2;
	gSizer2 = new wxGridSizer( 2, 2, 0, 0 );
	
	m_staticText12 = new wxStaticText( this, wxID_NAME, wxT("Name"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
	gSizer2->Add( m_staticText12, 0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	m_textCtrl10 = new wxTextCtrl( this, ID_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_textCtrl10->SetMaxLength( 15 ); 
	m_textCtrl10->SetValidator( wxTextValidator( wxFILTER_ALPHA, &m_name ) );
	
	gSizer2->Add( m_textCtrl10, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("Grid Dimensions"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5->Wrap( -1 );
	gSizer2->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	gSizer2->Add( m_staticline2, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
	
	m_staticText6 = new wxStaticText( this, wxID_ANY, wxT("No. Cells in X"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText6->Wrap( -1 );
	gSizer2->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
	
	m_spinCtrl1 = new wxSpinCtrl( this, ID_XCELLS, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 1000, 0 );
	m_spinCtrl1->SetValidator( wxGenericValidator( &m_numX ) );
	
	gSizer2->Add( m_spinCtrl1, 0, wxALL, 5 );
	
	m_staticText7 = new wxStaticText( this, wxID_ANY, wxT("No. Cells in Y"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText7->Wrap( -1 );
	gSizer2->Add( m_staticText7, 0, wxALIGN_RIGHT|wxALL, 5 );
	
	m_spinCtrl2 = new wxSpinCtrl( this, ID_YCELLS, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 1000, 0 );
	m_spinCtrl2->SetValidator( wxGenericValidator( &m_numY ) );
	
	gSizer2->Add( m_spinCtrl2, 0, wxALL, 5 );
	
	m_staticText9 = new wxStaticText( this, wxID_ANY, wxT("Cell Dimensions"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText9->Wrap( -1 );
	gSizer2->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	gSizer2->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
	
	m_staticText10 = new wxStaticText( this, wxID_ANY, wxT("Size in X"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText10->Wrap( -1 );
	gSizer2->Add( m_staticText10, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
	
	m_spinCtrl3 = new wxSpinCtrl( this, ID_XSIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 1000, 0 );
	m_spinCtrl3->SetValidator( wxGenericValidator( &m_sizeX ) );
	
	gSizer2->Add( m_spinCtrl3, 0, wxALL, 5 );
	
	m_staticText11 = new wxStaticText( this, wxID_ANY, wxT("Size in Y"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText11->Wrap( -1 );
	gSizer2->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
	
	m_spinCtrl4 = new wxSpinCtrl( this, ID_YSIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 1000, 0 );
	m_spinCtrl4->SetValidator( wxGenericValidator( &m_sizeY ) );
	
	gSizer2->Add( m_spinCtrl4, 0, wxALL, 5 );
	
	m_button3 = new wxButton( this, wxID_OK, wxT("Create"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer2->Add( m_button3, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_button4 = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer2->Add( m_button4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
	
	this->SetSizer( gSizer2 );
	this->Layout();
	gSizer2->Fit( this );
	
	this->Centre( wxBOTH );
}

Dialog1::~Dialog1()
{
}

MyDialog2::MyDialog2( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxVERTICAL );
	
	wxFlexGridSizer* fgSizer21;
	fgSizer21 = new wxFlexGridSizer( 2, 1, 0, 0 );
	fgSizer21->SetFlexibleDirection( wxBOTH );
	fgSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_panel4 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_panel4->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ) );
	
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	
	bSizer3->Add( 0, 10, 0, wxEXPAND, 5 );
	
	wxFlexGridSizer* fgSizer2;
	fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 );
	fgSizer2->SetFlexibleDirection( wxBOTH );
	fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_bitmap1 = new wxStaticBitmap( m_panel4, wxID_ANY, wxBitmap( wxT("/home/rachel/workspace/AdamsAle/icons/INET_Midnight_Earth_iTools.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer2->Add( m_bitmap1, 0, wxALL, 5 );
	
	m_staticText10 = new wxStaticText( m_panel4, wxID_ANY, wxT("Adam's Ale App\n"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText10->Wrap( -1 );
	m_staticText10->SetFont( wxFont( 20, 71, 90, 92, false, wxEmptyString ) );
	
	fgSizer2->Add( m_staticText10, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	bSizer3->Add( fgSizer2, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
	
	m_staticText15 = new wxStaticText( m_panel4, wxID_ANY, wxT("A geostatistical model to logically fill in unknown data."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText15->Wrap( -1 );
	bSizer3->Add( m_staticText15, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_staticText11 = new wxStaticText( m_panel4, wxID_ANY, wxT("Developed by:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText11->Wrap( -1 );
	m_staticText11->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer3->Add( m_staticText11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_staticText12 = new wxStaticText( m_panel4, wxID_ANY, wxT("Rachel Robey"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
	bSizer3->Add( m_staticText12, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_staticText13 = new wxStaticText( m_panel4, wxID_ANY, wxT("Gabriel Montoya"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText13->Wrap( -1 );
	bSizer3->Add( m_staticText13, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_staticText14 = new wxStaticText( m_panel4, wxID_ANY, wxT("Orion Staples"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText14->Wrap( -1 );
	bSizer3->Add( m_staticText14, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_staticText16 = new wxStaticText( m_panel4, wxID_ANY, wxT("Orli Shlachter"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16->Wrap( -1 );
	bSizer3->Add( m_staticText16, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	
	bSizer3->Add( 1, 25, 0, 0, 0 );
	
	m_panel4->SetSizer( bSizer3 );
	m_panel4->Layout();
	bSizer3->Fit( m_panel4 );
	fgSizer21->Add( m_panel4, 1, wxEXPAND | wxALL, 5 );
	
	m_button3 = new wxButton( this, wxID_CANCEL, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer21->Add( m_button3, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
	
	bSizer2->Add( fgSizer21, 1, wxEXPAND, 5 );
	
	this->SetSizer( bSizer2 );
	this->Layout();
	bSizer2->Fit( this );
	
	this->Centre( wxBOTH );
}

MyDialog2::~MyDialog2()
{
}
